
export const changeTime = (time)=>{
    // let prev=new Date(time).getTime();
    // let now=Date.now();

    let cha=Date.now()-new Date(time).getTime();
    let s=1000,
        m=s*60,
        h=m*60,
        day=h*24
    if(cha/day>=1){
        return Math.round(cha/day)+'天前'
    }else if(cha/h>=1){
        return Math.round(cha/h)+'小时前'
    }else{
        return Math.round(cha/m)+'分钟前'
    }
}